# Find installed OpenNI files

# find include path
find_path(OpenNI_INCLUDE_DIR
   NAMES XnCppWrapper.h
   DOC "OpenNI include path"
)

# find static library
find_library(OpenNI_LIBRARY
   NAMES OpenNI
   DOC "OpenNI static library path"
)

set(OpenNI_INCLUDE_DIRS ${OpenNI_INCLUDE_DIR})
set(OpenNI_LIBRARIES ${OpenNI_LIBRARY})
set(OpenNI_DEFINITIONS "-D__LINUX__")

if (OpenNI_INCLUDE_DIR AND OpenNI_LIBRARY)
   set(OpenNI_FOUND TRUE)
   if (NOT OpenNI_FIND_QUIETLY)
      message (STATUS "Found OpenNI: ${OpenNI_LIBRARY}")
   endif()
else()
   set(OpenNI_FOUND FALSE)
   if (OpenNI_FIND_REQUIRED)
      message(FATAL_ERROR "Could not find OpenNI")
   endif()
endif()
